<?include("../../config/config.php");
$DM->loadClass("tracker","log");
// create and instance class
$object_log = new log();
$object_log->getList();
?>
<html>
<head>
<title>log</title>
<link href="../../resource/includes/css/admin.css" type="text/css" rel="stylesheet" rev="stylesheet" />
<script>
function apagar(_id){
	if (confirm('Erase this item from the system?')){
		window.location.href='log.delete.php?id='+_id+'&apagar=apag';
	}
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#efefef"  width='600'>
	<tr align=left>
		<td height='25' colspan='11' class='titleTd'>LISTA DE LOG</td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='11' align='center'><a href=log.edit.php class='mainAction'>ADICIONAR NOVA log</a></td>
	</tr>		
	<tr align='center'>
		<td height='25' colspan='11' bgcolor="#FFFFFF"></td>
	</tr>		
	<tr>		<td class='titleTd' align='center'>ID</td>
		<td class='titleTd' align='center'>id_site</td>
		<td class='titleTd' align='center'>id_uagent</td>
		<td class='titleTd' align='center'>id_charset</td>
		<td class='titleTd' align='center'>id_lang</td>
		<td class='titleTd' align='center'>id_page</td>
		<td class='titleTd' align='center'>id_query</td>
		<td class='titleTd' align='center'>ip4</td>
		<td class='titleTd' align='center'>ip6</td>
		<td class='titleTd' align='center'>timestamp</td>
		<td class='titleTd' align='center'>Actions</td>
	</tr>
<?
for ($i=0;$i<count($object_log->lista);$i++){
$line = $line!="line1"?"line1":"line2";
	$object_log->id_log=$object_log->lista[$i][id_log];
	$object_log->getById();
	echo "<TR>
<td align='center' class='<?=$line?>'>$object_log->id_log</td>
<td align='center' class='<?=$line?>'>$object_log->id_site</td>
<td align='center' class='<?=$line?>'>$object_log->id_uagent</td>
<td align='center' class='<?=$line?>'>$object_log->id_charset</td>
<td align='center' class='<?=$line?>'>$object_log->id_lang</td>
<td align='center' class='<?=$line?>'>$object_log->id_page</td>
<td align='center' class='<?=$line?>'>$object_log->id_query</td>
<td align='center' class='<?=$line?>'>$object_log->ip4</td>
<td align='center' class='<?=$line?>'>$object_log->ip6</td>
<td align='center' class='<?=$line?>'>$object_log->timestamp</td>
		<td align='center'><a class='minorAction' href='log.edit.php?id=$object_log->id_log'>editar</a> - <a class='minorAction' href='javascript:apagar($object_log->id_log);'>apagar</a></td>
	";
	echo "</TR>";
}
?>
</table></body></html>